/*
 * Copyright 2016 LinkedIn Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

/** breadcrumb **/
.bread-crumb {
  display: inline-block;
  overflow: hidden;
  background: #0084BF;
  margin-top: 20px;
}

.bread-crumb a {
  text-decoration: none;
  outline: none;
  display: block;
  float: left;
  font-size: 12px;
  line-height: 36px;
  color: white;
  padding: 0 10px 0 30px;
  background: #666;
  background: linear-gradient(#666, #333);
  position: relative;
}

/*since the first link does not have a triangle before it we can reduce the left padding to make it look consistent with other links*/
.bread-crumb a:first-child {
  padding-left: 10px;
  border-radius: 5px 0 0 5px; /*to match with the parent's radius*/
}

.bread-crumb a:last-child {
  border-radius: 0 5px 5px 0; /*this was to prevent glitches on hover*/
  padding-right: 20px;

}

/*hover/active styles*/
.bread-crumb a.active, .bread-crumb a:hover {
  background: #333;
  background: linear-gradient(#333, #000);
}

.bread-crumb a.active:after, .bread-crumb a:hover:after {
  background: #333;
  background: linear-gradient(135deg, #333, #000);
}

/*adding the arrows for the breadcrumbs using rotated pseudo elements*/
.bread-crumb a:after {
  content: '';
  position: absolute;
  top: 0;
  right: -18px; /*half of square's length*/
  width: 36px;
  height: 36px;
  transform: scale(0.707) rotate(45deg);
  /*we need to prevent the arrows from getting buried under the next link*/
  z-index: 1;
  /*background same as links but the gradient will be rotated to compensate with the transform applied*/
  background: #666;
  background: linear-gradient(135deg, #666, #333);
  /*stylish arrow design using box shadow*/
  box-shadow: 2px -2px 0 2px rgba(0, 132, 191, 1),
  3px -3px 0 2px rgba(255, 255, 255, 0.1);
  /*
        5px - for rounded arrows and
        50px - to prevent hover glitches on the border created using shadows*/
  border-radius: 0 5px 0 50px;
}

/*we dont need an arrow after the last link*/
.bread-crumb a:last-child:after {
  content: none;
}

/*we will use the :before element to show numbers*/
.bread-crumb a:before {
  border-radius: 100%;
  height: 20px;
  line-height: 20px;
  position: absolute;
  top: 0;
  background: #444;
  background: linear-gradient(#444, #222);
  font-weight: bold;
}

.flat a, .flat a:after {
  background: white;
  color: #5e6365;
  transition: all 0.5s;
}

.flat a:before {
  background: white;
  box-shadow: 0 0 0 1px #ccc;
}

.flat a:hover, .flat a.active,
.flat a:hover:after, .flat a.active:after {
  background: #0084bf;
  color: white;
}
